#ifndef __ADC_H
#define __ADC_H
#include "sys.h"
void GPIO_Configuration_adc(void);
void RCC_Configuration(void);
void ADC1_Configuration(void);
void DMA_Configuration(void);
void filter(void);
unsigned short int GetVolt(unsigned short int advalue);
unsigned short int GetmA(unsigned short int advalue);
int Joy_Flter(u16 In,u16 Pos,u16 Neg,u16 Zero,u16 dead,u16 Diff);
int Pot_Flter(u16 In,u16 min,u16 max,u16 dead,u16 Diff);
int adc_fliter(int In,u8 length,u8 cycle,u8 *P_mid,long int *P_total,int *P_adc);
short Get_Temprate(u16 In);
#define N 250 //
#define M 14 //
extern unsigned short int AD_Value[N][M]; //
extern unsigned short int After_filter[M]; //
#endif


